<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/sessionCheck.jsp" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><bean:message key='com.application.systemmanager.notice_list'/></title>
<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet" type="text/css" />

<script language="javascript" src="<%=path%>/js/util.js"></script>
<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
	<script language="javascript" src="<%=path%>/application/js/treeSelect.js"></script>
</head>
<body>
<html:form styleId="noticeForm" action="updateNotice.do?method=updateNotice" onsubmit="return save();">
<html:hidden property="id" value="${notice.id}"/>
			<table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="margtb5">
		    <tr>
		      <td align="left" class="padl5 lan12"><img src="<%=path%>/images/img-11.gif" width="12" height="12">&nbsp;我的工作台 &gt; 通知公告 &gt; 编辑</td>
		    </tr>
		   </table>
	   <table cellspacing="1" cellpadding="0" width="98%" align="center"  border="0" class="bgcolor2 margb5">
 
              <tr align="left" class="bgcolor">
		
					  <td width="20%" colspan="2" align="right" class="cmsrow"><bean:message key="com.application.systemmanager.notice_title"/>：<font color="red">*&nbsp;</font></td>
					  <td width="90%" colspan="6" class="cmsrow">
					 <input type="text" name="noticeTitle" size="50" flag="true"  maxlength="25"  valid="required" errMsg="请输入标题！" value='${notice.noticeTitle}'/>        </td>
				  </tr>
				  <tr align="left" class="bgcolor">
					  <td width="20%" colspan="2" align="right" class="cmsrow"><bean:message key="com.application.systemmanager.notice_type"/>：<font color="red">*&nbsp;</font></td>
					  <td width="80%" colspan="6" class="cmsrow">
			               <ssh:select firstShow="N" propertyName="noticeType" pid="NOTICE_TYPE" type="1" defaultName="${notice.noticeType}"/>
					   </td>
				  </tr>
				  <tr align="left" class="bgcolor">
					  <td width="20%" colspan="2" align="right" class="cmsrow"><bean:message key="com.application.systemmanager.notice_person"/>：<font color="red">*&nbsp;</font></td>
					  <td width="80%" colspan="6" class="cmsrow">
	                    <input type="hidden" value="0" id="personid" name="personid" size="80" />
					 <input type="text" readonly="true" name="noticePerson" maxlength="10" value="${notice.noticePerson}" flag="true"  valid="required" errMsg="请输入发布人！"/>
					 <!-- 
					  <input class="buttonbg" id="sel_department2" type="button" onClick="openTree('divTree','user_bm_o','${pageContext.request.contextPath}/common/treeSelect.jsp?iid=personid&iname=noticePerson',this)" value="选择" name="but_select2" />
					  	
					  		<div id="divTree"
			style="position: absolute; background: #FFFFFF; left: 1px; top: 1px; height =300; width: 253px; display: none"></div>
			   -->  
                  </td>
				  </tr>
				  <tr align="left" class="bgcolor">
					  <td width="20%" colspan="2" align="right" class="cmsrow"><bean:message key="com.application.systemmanager.notice_date"/>：<font color="red">*&nbsp;</font></td>
					  <td width="90%" colspan="6" class="cmsrow">
				      <input type="text" name="noticeDate"  flag="true"  valid="required" errMsg="请输入发布时间！" onclick="popUpCalendarDlg(this)" readonly="true" value="${notice.noticeDate}"/>       </td>
				  </tr>
				 	<tr align="left" class="bgcolor">
					  <td width="20%" colspan="2" align="right" class="cmsrow"><bean:message key="com.application.systemmanager.notice_content"/>：<font color="red">*&nbsp;</font></td>
					  <td width="90%" colspan="6" class="cmsrow">
                        <html:hidden styleId="noticeContent" property="noticeContent" value="${notice.noticeContent}"/>
		                <IFRAME ID="eWebEditor1" src="<%=basePath%>/common/eWebEditor/eWebEditor.jsp?id=noticeContent&style=standard" frameborder="0" scrolling="no" width="650" height="350"></IFRAME>				
                      </td>
				  </tr>
				  				
			  </tbody>
	  </table>


		<p><p><p>
	
<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
         <input class="buttonbg" id="but_save" type="submit" value="保存" name="but_save" />
		  &nbsp;&nbsp;&nbsp;
		  <input class="buttonbg" id="but_return" type="button" value="返回" name="but_return"" onClick="javascript:history.go(-1);"/>
  </tr>
</table>
  
</html:form>
</body>
</html>


<script>

function save(){
    if(validateForm(document.forms[0],'Y'))
	{
	     if($("noticeType").value==null || $("noticeType").value==""){
	        alert("请选择消息类型！");
	        return false;
	     }
	     if(eWebEditor1.getHTML() == ""){
	    	alert("请输入内容！");
	    	return false;
	    }
	    $("noticeContent").value = eWebEditor1.getHTML();
		return true;
		document.forms[0].submit();
	}else{
	    return false;
	}
}

</script>

